import request from "../utils/request";

// 获取帖子列表
export const getUserList_API = (query) => {
  return request({
    url: "/xcx/t_post/query",
    method: "GET",
    params: query,
  });
};

// 获取帖子详情
export const getUserInfo_API = (query) => {
  return request({
    url: "/xcx/t_post/get",
    method: "GET",
    params: query,
  });
};

/* 新增帖子 */
export const addFourm_API = (data) => {
  return request({
    url: "/xcx/t_post/insert",
    method: "POST",
    data,
  });
};

// 图片上传
export const upLoadImage_API = (data) => {
  return request({
    url: "/image_file/upload",
    method: "POST",
    data,
  });
};

//我收藏的帖子
export const getCollectList_API = () => {
  return request({
    url: "/xcx/t_collection/list",
    method: "GET",
  });
};

//我点赞的帖子
export const getLikeList_API = () => {
  return request({
    url: "/xcx/t_like/list",
    method: "GET",
  });
};
// 我发布的帖子
export const getMyList_API = () => {
  return request({
    url: "/xcx/t_post/query_owner",
    method: "GET",
  });
};
